#include "httpSvr/router.h"
#include "httpSvr/request.h"
#include "httpSvr/response.h"

#include <stdio.h>

using namespace wheels;

void test_hander(Request &req, Response &res)
{
    printf("test_hander\n");
}

int main()
{
    auto router = CreateRouter();
    router->Register("/api/v1/test", HttpMethod::GET, test_hander);
    auto h = router->GetHandler("/api/v1/test", HttpMethod::GET);
    if (h) {
        printf("has handler: /\n");
    } else {
        printf("no handler: /\n");
    }

    return 0;
}
